#创建单行文本框
import tkinter as  tk

root = tk.Tk()
root.title("hello world")
root.geometry()
var = tk.StringVar()
e = tk.Entry(root, textvariable=var)
var.set("hello")
e.pack()

root.mainloop()